package io.geekidea.springbootplus.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@Getter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysAddress对象", description = "收货地址信息")
public class SysAddress extends BaseEntity {

  private static final long serialVersionUID = -3850126421409061429L;

  @ApiModelProperty("主键")
  @TableId(value = "id", type = IdType.AUTO)
  @NotNull(groups = Update.class, message = "地址ID不能为空")
  private Integer id;

  @ApiModelProperty("收货人姓名")
  @NotBlank(message = "收货人姓名不能为空")
  private String name;

  @ApiModelProperty("会员编号")
  private Integer memberId;

  @ApiModelProperty("省地址")
  @NotBlank(message = "省地址不能为空")
  private String province;

  @ApiModelProperty("市地址")
  @NotBlank(message = "市地址不能为空")
  private String city;

  @ApiModelProperty("区地址")
  @NotBlank(message = "区地址不能为空")
  private String district;

  @ApiModelProperty("详细地址")
  @NotBlank(message = "详细地址不能为空")
  private String address;

  @ApiModelProperty("邮政编号")
  private Integer zipCode;

  @ApiModelProperty("手机号码")
  private String phone;

  @ApiModelProperty("会员删除标记")
  private Integer deleted;

  @ApiModelProperty("默认地址标记")
  private Integer isDefault;



}
